DAV endpoint#7
Conversation
de35e52 to
fed5bef
Compare
|
Rebased, added lots of tests. A few calls and conditions are missing still. |
fed5bef to
cb2f959
Compare
|
Already implemented the main part of the spec #3 for managing groups and memberships. Next step: REPORT |
|
I've added the REPORT as well: Here is how to get one. <?xml version="1.0" encoding="utf-8" ?>
<oc:filter-members xmlns:a="DAV:" xmlns:oc="http://owncloud.org/ns" >
<oc:filter-rules>
<oc:user-id>user1</oc:user-id>
<!-- <oc:is-admin>1</oc:is-admin> -->
</oc:filter-rules>
</oc:filter-members>Then Gives: <?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:status>HTTP/1.1 200 OK</d:status>
<d:href>/owncloud/remote.php/dav/customgroups/x/user1</d:href>
<d:propstat>
<d:prop>
<oc:is-admin>0</oc:is-admin>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:status>HTTP/1.1 200 OK</d:status>
<d:href>/owncloud/remote.php/dav/customgroups/y/user1</d:href>
<d:propstat>
<d:prop>
<oc:is-admin>0</oc:is-admin>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>It basically returns the result for the I'd like to refine this separately once we start working on the UI. |
0480c8c to
68df270
Compare
The sad thing about adding this is that now I need to inject a group manager everywhere... |
There was a problem hiding this comment.
CustomGroupMemberNode::classThere was a problem hiding this comment.
ReportNotSupported is unknown
There was a problem hiding this comment.
ReportNotSupported is unknown
please have a look at the carddav query request - there is a node where you select the elements which you expect to be returned ... https://tools.ietf.org/html/rfc6352#section-8.6.3 <D:prop>
<D:getetag/>
<CG:display/>
</D:prop> |
1e16954 to
8ff08b9
Compare
|
Are you kidding me... Will need to exclude the composer stuff from the code checker |
8ff08b9 to
628cf27
Compare
|
Squashed and removed the composer files I checked in by mistake from the other branch. |
|
ownCloud admins can now also manage groups even when they aren't members. Instead of passing around yet another object |
|
@DeepDiver1975 please re-review. My next step is to adjust the REPORT to implement pagination, but this could also be done separately if this PR is already mergable. |
|
I'm feeling a bit lazy with the REPORT + pagination especially if I need to do it for all the different endpoints. So I came up with this generic paginated report idea, please check it out: owncloud/core#26840 |
|
REPORT will be done in a separate PR. @DeepDiver1975 please review |
There was a problem hiding this comment.
I'd use string interpolation for better readability
throw new Forbidden("No permission to add members to group '$groupId'");
|
This is by design, same like the "users" list principal. You need to know the user name you want to query. |
Okay - in debug mode we allow listing of users in other collections as well |
Yet another code path to test / unit test and maintain. I'd rather not. Unless we make it more useful by enabling user listing for any admins Let me know what you think. |
|
Adjusted exception formatting. Added missing case: ownCloud admin can now enter the "users/$userId" subcollection even if not a member. @DeepDiver1975 I'd like to not add user listing here, it would require injecting the user manager, etc. I don't think it's useful enough, especially if only used in debug mode. |
628cf27 to
1f2b0e3
Compare
This PR is based on top of #1.
This adds DAV endpoints for #3